package com.exhr.biz.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.exhr.biz.DepartmentBiz;
import com.exhr.dao.DepartmentDao;
import com.exhr.pojo.Tdepartment;
import com.exhr.util.impl.Page;

public class DepartmentBizImpl implements DepartmentBiz{
	private DepartmentDao depdao;
	
	public void addDep(Tdepartment dep){
		depdao.add(dep);
	}
	
	public void delDep(int id){
		depdao.delete(id);
	}
	
	public void update(Tdepartment dep){
		depdao.update(dep);
	}
	
	public Tdepartment getDepById(int id){
		return depdao.query(id);
	}
	
	public List<Tdepartment> searchForPage(Tdepartment dep,Page page){
		return depdao.searchForPage(dep, page);
	}

	public void setDepdao(DepartmentDao depdao) {
		this.depdao = depdao;
	}		
		
}
